package com.shiliu.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @description: 测试用户实体类
 * @author: shiliu
 * @created: 2019/12/18 9:33
 * @version: v1.0.0
 */
@Data
@TableName(value = "tab_user")
@ApiModel(description = "测试用户实体类")
public class TestUser {

    @TableId
    @ApiModelProperty(value = "主键")
    private Long id;
    @ApiModelProperty(value = "用户名")
    private String name;
    @ApiModelProperty(value = "年龄")
    private Integer age;
    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(hidden = true)
    private Long managerId;
    @ApiModelProperty(hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @ApiModelProperty(hidden = true)
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
    @ApiModelProperty(hidden = true)
    @Version
    private Integer version;
    /**
     * yml文件中配置好删除的值和未被删除的值之后需要使用
     * @TableLogic 标注此字段是逻辑删除字段
     */
    @TableLogic
    @ApiModelProperty(hidden = true)
    private Integer deleted;
}
